/*
 * Copyright (c) 2015 www.smarthome.com All rights reserved. 本软件源代码版权归----所有,未经许可不得任意复制与传播.
 */
package com.smarthome.base.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.smarthome.base.dao.ShUserRoleDao;
import com.smarthome.base.dao.base.BaseDao;
import com.smarthome.base.service.ShUserRoleService;
import com.smarthome.base.service.base.BaseServiceImpl;
import com.smarthome.domain.bean.ShUserRole;

/**
 * ShUserRoleService 实现类
 * @author KongXiangyu
 * @since 2015-09-07
 */
@Service("shUserRoleService")
public class ShUserRoleServiceImpl extends BaseServiceImpl<ShUserRole, Long> implements ShUserRoleService {

    @Resource
    private ShUserRoleDao shUserRoleDao;

    public BaseDao<ShUserRole, Long> getDao() {
        return shUserRoleDao;
    }

    @Override
    public List<ShUserRole> queryUserRolesByUserId(Long userId) {
        return shUserRoleDao.queryUserRolesByUserId(userId);
    }

	/* (non-Javadoc)
	 */
	@Override
	public ShUserRole queryUserRoleRootByResidenceId(Long residenceId) {
		
		return shUserRoleDao.queryUserRoleRootByResidenceId(residenceId);
	}

	/* (non-Javadoc)
	 * @see com.smarthome.base.service.ShUserRoleService#queryShUserRolesByResidenceId(java.lang.Long)
	 */
	@Override
	public List<ShUserRole> queryShUserRolesByResidenceId(Long residenceId) {
		return shUserRoleDao.queryShUserRolesByResidenceId(residenceId);
	}

	@Override
	public List<ShUserRole> queryUserRoleRootByResidenceId(Long... residenceId) {
		return shUserRoleDao.queryUserRoleRootByResidenceId(residenceId);
	}
	
}